import 'package:flutter/material.dart';
import 'package:flutter_base/base/loading_view.dart';

class RefreshContainer extends StatelessWidget {
  bool loading;
  Widget child;

  RefreshContainer(this.loading, this.child);

  @override
  Widget build(BuildContext context) {
    return IndexedStack(
      index: loading ? 0 : 1,
      children: [LoadingView(), child],
    );
  }
}
